@extends('Admin.layout.layout')
@section('title','用户添加')
@section('content')
    <div class="row">
        <div class="col-lg-12">
            <h1 class="page-header">用户添加</h1>
        </div>
        <!-- /.col-lg-12 -->
    </div>
    <div class="row">
        <div class="col-lg-6 col-lg-offset-3">
            @if(session('error'))
                {{session('error')}}
            @endif

            @if (count($errors) > 0)
                <div class="">
                    <ul>
                        @foreach ($errors->all() as $error)
                            <li>{{ $error }}</li>
                        @endforeach
                    </ul>
                </div>
            @endif
            <form role="form" action="{{url('/admin/user/insert')}}" method="post" enctype="multipart/form-data">
                <div class="form-group">
                    <label>用户名</label>
                    <input class="form-control" type="text" name="username" value="{{old('username')}}">
                </div>
                <div class="form-group">
                    <label>密码</label>
                    <input class="form-control" type="password" name="password" value="{{old('password')}}">
                </div>
                <div class="form-group">
                    <label>确认密码</label>
                    <input class="form-control" type="password" name="repassword" value="{{old('username')}}">
                </div>
                <div class="form-group">
                    <label>年龄</label>
                    <input class="form-control" type="text" name="age" value="{{old('age')}}">
                </div>
                <div class="form-group">
                    <label>邮箱</label>
                    <input class="form-control"  type="text" name="email" value="{{old('email')}}">
                </div>
                <div class="form-group">
                    <label>手机</label>
                    <input class="form-control" type="text" name="phone" value="{{old('phone')}}">
                </div>
                <div class="form-group">
                    <label>性别</label>
                    <div class="radio">
                        <label>
                            <input name="sex" value="1" checked="" type="radio">男&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
                            <input name="sex" value="2" type="radio">女&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
                            <input name="sex" value="3" type="radio">保密
                        </label>
                    </div>
                </div>
                <div class="form-group">
                    <label>学历</label>
                    <select class="form-control" name="edu">
                        <option value="1">初中</option>
                        <option value="2">高中</option>
                        <option value="3">大专</option>
                        <option value="4">本科</option>
                        <option value="5">硕士</option>
                    </select>
                </div>
                <div class="form-group">
                    <label>用户权限</label>
                    <select class="form-control" name="qx" id="qx">
                        <option value="1">普通用户</option>
                        <option value="2">普通管理员</option>
                        <option value="3">超级管理员</option>
                    </select>
                </div>
                <div class="form-group">
                    <label>上传头像</label>
                    <input type="file" name="pic">
                    <img src="">
                </div>
                {{ csrf_field() }}
                <!-- <button class="btn btn-primary btn-lg btn-block">注册</button> -->
                <button type="submit" class="btn btn-success">注册</button>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
                <button type="reset" class="btn btn-warning">重置</button>
            </form>
        </div>
    </div>
@endsection